<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台--文章管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>images/style.css" />
    <base target="_self"/>

    <script src='<?php echo isset($skin)?$skin:"";?>js/jquery.min.js'></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/dist/dialog-min.js"></script>
    <script src="<?php echo isset($skin)?$skin:"";?>js/admin.js"></script>
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
        });
        //-->
    </script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>/js/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate-plugin.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artDialog.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/iframeTools.js"></script>
<link rel="stylesheet" href="<?php echo isset($skin)?$skin:"";?>js/artdialog.css" type="text/css">
</head>
<body>
<div class="hh6"></div>

<script language="javascript">
    //获得选中文件的数据表
    function getCheckboxItem() {
        var myform = document.form1;
        var allSel = "";
        if (myform.tables.value)
            return myform.tables.value;
        for (i = 0; i < myform.tables.length; i++)
        {
            if (myform.tables[i].checked) {
                if (allSel == "")
                    allSel = myform.tables[i].value;
                else
                    allSel = allSel + "," + myform.tables[i].value;
            }
        }
        return allSel;
    }

    //反选
    function ReSel() {
        var myform = document.form1;
        for (i = 0; i < myform.tables.length; i++) {
            if (myform.tables[i].checked)
                myform.tables[i].checked = false;
            else
                myform.tables[i].checked = true;
        }
    }

    //全选
    function SelAll() {
        var myform = document.form1;
        for (i = 0; i < myform.tables.length; i++) {
            myform.tables[i].checked = true;
        }
    }

    //取消
    function NoneSel() {
        var myform = document.form1;
        for (i = 0; i < myform.tables.length; i++) {
            myform.tables[i].checked = false;
        }
    }

    function checkSubmit()
    {
        var myform = document.form1;
        myform.tablearr.value = getCheckboxItem();
        return true;
    }

</script>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="new_table">
    <thead>
    <tr class="n_bt"><td colspan="9" align="center">管理系统</td></tr>
    <tr><th class="thbt" colspan="8">【<?php echo isset($title)?$title:"";?>】 <a href="?c=backup&a=reduction">数据还原</a></th></tr>
    </thead>
    <form name="form1" onSubmit="checkSubmit()" action="?c=backup&a=back_do" method="post" target="stafrm">
        <input type='hidden' name='tablearr' value='' />
        <tr><td height="24" colspan="8"><strong>爱不语数据表：</strong></td></tr>
        <tr class="artlist">
            <td height="24" width="5%">选择</td>
            <td width="20%">表名</td>
            <td width="8%">记录数</td>
            <td width="17%">操作</td>
            <td width="5%">选择</td>
            <td width="20%">表名</td>
            <td width="8%">记录数</td>
            <td width="17%">操作</td>
        </tr>
        <tr class="artlist" height='30' class="artlist">
            <?php if(is_array($tab))  foreach($tab as $k=>$v) { ?>
            <?php if($k%2==0 and $k>1){?></tr><tr class="artlist"><?php }?>
            <td><input type="checkbox" name="tables" value="<?php echo isset($v[0])?$v[0]:"";?>" class="np" checked /></td>
            <td><?php echo isset($v[0])?$v[0]:"";?></td>
            <td><?php echo isset($v[1])?$v[1]:"";?></td>
            <td></td>
            <?php if(count($tab)%2!=0 and count($tab)==($k+1)){?><td></td><td></td><td></td><td></td><?php }?>
            <?php }?>
        </tr>
        <tr> <td></td><td></td><td></td>
            <td height="24" colspan="8">
                &nbsp;
                <input name="b1" type="button" id="b1" class="button" onClick="SelAll()" value="全选" />
                &nbsp;
                <input name="b2" type="button" id="b2" class="button" onClick="ReSel()" value="反选" />
                &nbsp;
                <input name="b3" type="button" id="b3" class="button" onClick="NoneSel()" value="取消" />
            </td>
        </tr>
        <tr><td height="24" colspan="8"><strong>数据备份选项：</strong></td></tr>
        <tr>
            <td height="50" colspan="8">
                <table width="90%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30">当前数据库版本： <?=db::version()?></td>
                    </tr>
                    <tr>
                        <td>当前PHP的版本的为: <?php echo PHP_VERSION; ?></td>
                    </tr>
                    <tr>
                        <td height="30">
                            分卷大小：
                            <input name="fsize" type="text" id="fsize" value="2048" size="6" />
                            K&nbsp;，
                            <input name="isstruct" type="checkbox" class="np" id="isstruct" value="1" checked='1' />

                            <input type="submit" name="Submit" value="提交"  class="button" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </form>
    <tr bgcolor="#F9FCEF"><td height="24" colspan="8"><strong>进行状态：</strong></td></tr>
    <tr bgcolor="#FFFFFF">
        <td height="180" style="height: 180px;" colspan="8"><iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>	</td>
    </tr>
</table>
<script type="text/javascript">
    <!--
    $(document).ready(function () {
        $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
    });

    //-->
    function alert_del(url) {
        if (confirm("您确定要删除吗？"))
            window.location = url;
        return false;
    }
</script>
</body>
</html>
